package mybatisplus.entites;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@AllArgsConstructor
@Data
@NoArgsConstructor
public class Users {
    @TableId(type = IdType.AUTO)
    private int id;
    private String name;
    private String password;
//    字段添加内容自动
    @TableField(fill=FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updataTime;
    @Version  //代表一个乐观锁
    private Integer version;
    @TableLogic
    private Integer deleted;
}
